package com.ruoyi.common.utils;


import java.util.Random;

public class RandomUtils {

    private static Random random =null;
    /** 6位随机数  */
    public static final String randomNumSix() {
        random = new Random();
        String result = "";
        for (int i = 0; i < 6; i++) {
            result += random.nextInt(10);
        }
        return  result;
    }

    /** 4位随机数  */
    public static final String randomNumFour() {
        random = new Random();
        String result = "";
        for (int i = 0; i < 4; i++) {
            result += random.nextInt(10);
        }
        return  result;
    }

    public static void main(String[] args) {

        System.out.println( RandomUtils.randomNumSix());
    }
}
